The present invention relates generally to electronic devices and more particularly to a mechanism for translating between word processing documents and extensible markup language (XML) documents.
Most businesses store a large volume of documents on storage media, such as magnetic disks. These documents are often largely comprised of word processing documents that originate from word processing programs. Word processing programs are widely distributed among business, and the storage of the documents as word processing documents has generally worked well for most business.
Recently, however, businesses have desired to provide access to documents over the Internet or via an internal intranet. Such word processing documents cannot readily be displayed via web browsers. As a result, many businesses have sought to convert word processing documents into hypertext markup language (HTML) documents, which are readily viewable by most web browsers. Unfortunately, the conversion of word processing documents into HTML documents is time consuming and error prone.
Another complication for many businesses is that the current trend is away from HTML documents and towards extensible markup language (XML) documents. XML is more flexible than HTML and provides a richer set of capabilities. Many analysts believe that XML will replace HTML as the markup language of choice for content that is viewable on the Internet. As a result, many businesses wish to have their content stored as XML documents. Unfortunately, content is currently stored as word processing documents.
The present invention addresses the above-described problem by providing a convenient mechanism for converting word processing documents into XML documents. The present invention may also include a mechanism for converting XML documents into word processing documents. The mechanism for converting between word processing documents and XML documents may be directly integrated with the word processing program so that when a user creates a word processing document, the word processing document may be converted into an XML document and persistently stored. The content is, thus, readily available as an XML document for easy display by a web browser or other suitable viewer. This approach allows a user to employ the word processing program as a sort of xe2x80x9cXML editorxe2x80x9d. The user need not learn the syntax of XML; rather the mechanism provides user friendly and transparent conversion of word processing documents into XML documents.
In accordance with one aspect of the present invention, a method is practiced in electronic device, such as a computer system, by a tool that operates on a word processing document. The tool converts the word processing document into an intermediate format and then subsequently converts the document from the intermediate format into an XML document.
In accordance with the further aspect of the present invention, the tool for converting between a word processing document and an XML document is found in an electronic device. The tool includes a first conversion facility for converting between the word processing document and an intermediate format document and a second conversion facility for converting between the intermediate format document and an XML document.
In accordance with the further aspect of the present invention, a method is practiced in a computer system that includes a word processing document in a word processing format. A user of the computer system is presented with a user interface element that enables the user to cause a representation of a word processing document as an XML file to be created. Such an XML file is created in response to the user interacting with user interface element.